var connector = require("../../../src/runtime/jaba");

var index = 0;

(function($service$){
var $input$ = {};

/* Init code */

/* Remote code */
var $script$ = 'for year in root.Orders.groupBy("Year") do (g0:year.Key; for order in year.Items do (g1:order.OrderDate) end; ) end; ';
var $batch$ = $service$.execute($script$, $input$, function($result$) {

/* Local code */
$result$.getIteration("year").forEach(function(year){
console.log((" Year=" + year.getString("g0")));
year.getIteration("order").forEach(function(order){
console.log(((("    OrderDate=" + order.getString("g1")) + " Freight=") + o.Freight));
});
});

});
})(connector);